import pymysql
class Model(object):
    def __init__(self):
        #链接数据库
        self.conn=pymysql.connect(host='127.0.0.1', user='root', passwd='root', db='caigou', charset='utf8',cursorclass=pymysql.cursors.DictCursor)
        #self.conn=pymysql.connect(host='127.0.0.1', user='root', passwd='root', db='travel', charset='utf8',cursorclass=pymysql.cursors.DictCursor)
        self.cursor =self.conn.cursor()